#include "History.h"
#include <stdio.h>

int main()
{
	History h;
	h.store(Reading(1,2));
	h.store(Reading(3,4));
	h.store(Reading(5,6));

//	h.print(2);

	if (!h.readFile("history.txt"))
		printf("failed to read history\n");
	h.print(100);

	vector<Reading> v = h.tail(3,2);

	for(int i = 0 ; i< v.size(); i++ )
	{ 
		printf("(%i,%i)\n", v[i].timestamp, v[i].value); 
	}

	return 0;
}
